import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/chickenflock/chickenflock/` + url, ...arg)

/**
 * 鸡群Api接口管理器
 *
 * @author zyb
 * @date  2023/12/13 11:59
 **/
export default {
	// 获取鸡群分页
	bizChickenFlockPage(data) {
		return request('page', data, 'get')
	},
	// 提交鸡群表单 edit为true时为编辑，默认为新增
	bizChickenFlockSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除鸡群
	bizChickenFlockDelete(data) {
		return request('delete', data)
	},
	// 获取鸡群详情
	bizChickenFlockDetail(data) {
		return request('detail', data, 'get')
	}
}
